home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbpdem / cancprt.bas next >
BASIC Source File  |  1991-07-04  |  1KB  |  48 lines

  1. ' Copy these statements into your GLOBAL file
  2.  
  3. DefInt A-Z
  4. Global Const False = 0
  5. Global Const True = -1
  6.  
  7. ' Structure used by GetTextMetrics as declared in the SDK
  8.  Type TextMetric
  9.    tmHeight As Integer
  10.    tmAscent As Integer
  11.    tmDescent As Integer
  12.    tmInternalLeading As Integer
  13.    tmExternalLeading As Integer
  14.    tmAveCharWidth As Integer
  15.    tmMaxCharWidth As Integer
  16.    tmWeight As Integer
  17.    tmItalic As String * 1
  18.    tmUnderLine As String * 1
  19.    tmStruckOut As String * 1
  20.    tmFirstChar As String * 1
  21.    tmLastChar As String * 1
  22.    tmDefaultChar As String * 1
  23.    tmBreakChar As String * 1
  24.    tmPitchAndFamily As String * 1
  25.    tmCharSet As String * 1
  26.    tmOverhang As Integer
  27.    tmDigitizedAspectX As Integer
  28.    tmDigitizedAspectY As Integer
  29. End Type
  30.  
  31. ' Used to determine if printing should be ABORTED
  32. Global pABORT As Integer
  33.  
  34. ' Misc values
  35. Global Const MODELESS = 0
  36. Global DocName As String
  37.  
  38. ' Constants used by GetDeviceCaps ( pixel counts of the device )
  39. Global Const VERTRES = 10
  40. Global Const HORZRES = 8        ' Windows SDK values
  41.  
  42.  
  43. ' Windows API Function Declarations
  44. Declare Function GetDeviceCaps Lib "Gdi" (ByVal hdc, ByVal nIndex)
  45. Declare Function GetTextMetrics Lib "Gdi" (ByVal hdc, LPTEXTMETRIC As TextMetric)
  46. Declare Function SetActiveWindow Lib "user" (ByVal hdc)
  47.  
  48.